EMT Practice Test

1. Question Content...


Question List

Question1: A merchant requires the ability to configure contact information for their brick and mortar stores as a CSV file upload. The module already exists and contains an etc/adminhtml/system.xml file where the new field can be added.
How do you specify the class that will process the uploaded file?

Question2: You have created a module to show manufacturer-list, but in your page need to show Pagination that already ready in your block. Keeping maintainability in mind, where you call echo $block->getPagerHtml();?

Question3: What scopes are available for customer attributes?

Question4: You are facing a bug, which is supposedly caused by the customization of
\Magento\Catalog\Api\ProductRepositoryInterface::save().
To resolve the issue, you decide to find all logic which customizes this method. Which two places do you search for customization declarations? (Choose 2)

Question5: A merchant asks you to extend customer functionality to allow customer accounts to be associated with two or more billing addresses.
How is this implemented?

Question6: There are two different configurable products which both share one variation. The shared variation is represented by the same simple product.
A customer added both configurables to the cart with the same selected variation?
How will they be displayed?

Question7: How can you access the select query of a collection?

Question8: You are working on a Magento store which will be selling in two countries. Each country has its own set of payment methods.
How do you organize the project to support this requirement?

Question9: You are reviewing a Magento module and see a directory named Service.
What can you determine from this directory's name?

Question10: What is the connection between product attribute sets and categories?

Question11: You want to declare a block of the type \Magento\Framework\View\Element\Template with a template named view.phtml in the layout XML.
What is the correct layout declaration for this?

Question12: How do you add a new link into the My Account sidebar?

Question13: While developing a module you need to modify an existing Data Patch.
How can you force Magento to execute an existing Data Patch file again?

Question14: How do you persist an entity to the database?

Question15: What is the relationship between products and categories in Magento?

Question16: A merchant gives you the module MyCompany_MyModule to install.
How do you identify which REST endpoints are supported by the module?

Question17: A module you are developing requires the addition of new routes that should be accessible in the store front.
Where do you define your module's frontName?

Question18: You are working on a project that contains a million SKUs. The merchant has requested the product view page to have a custom color schema and page layout depending on the product price range.
How do you implement this, keeping simplicity in mind?

Question19: You
are customizing the display of product details page. On this page ur customer need to change the url in which the product category name will be appear as http://mystore.com/women/tops-women/helena-hooded- fleece.html , Keeping ,maintainability in mind ,How to get product url with category?

Question20: You are debugging a problem resulting from a recently deployed around plugin. The plugin is intercepting the doSomething method. The aroundDoSomething plugin method is called successfully, but the original doSomething method is no longer being executed as expected.
What is causing this?

Question21: You are reviewing a theme in app/design/frontend/MyCompany/MyTheme and see the file etc/view.xml.
What is the function of this file?

Question22: You are reviewing a module to some special functionality to the Magento 2 application, You see directory
/Console, What task you think in this directory contain script for this modules?

Question23: You have been asked to display details from the customer's latest order on the customer's account dashboard (customer/account/). You create a new custom template to show the information.
How do you obtain an order repository so you can fetch an order?

Question24: You are building a new module to add extra functionality to the Magento application.You want to works with CustomerData the data stored on the client side. Where initialized sections Cart and Directory-data are on the server side via the classes?

Question25: While reviewing a layout file named sales_order_view.xml you notice the element
<update handle="customer_account"/>
What is the purpose of this element?

Question26: You want to remove a column introduced by a third-party extension via declarative schema.
How do you do that?

Question27: A merchant asks you to create a module that is able to process URLs with a custom structure that can contain any combination of a product type code, a partial name, and a 4-digit year in any order. The request path will look like this: /product/:type-code/:name-part/:year Which layer in the Magento request processing flow is suited for this kind of customization?

Question28: Which entity in Magento supports scoped attributes?

Question29: You added a new constructor argument to an existing action controller class.
When you reload the page you get a PHP error that the wrong argument is passed to the class.
How do you fix this?

Question30: You are reviewing a module to some special functionality to the Magento 2 application, You see directory
/CustomerData, What task you think in this directory contain script for this modules?

Question31: You are adding an entry to the backend menu. To do so you open a core etc/adminhtml/menu.xml file as a reference. In the file you see the node:

What is the result of specifying resource="Magento_Catalog::catalog"?

Question32: You are tasked with ensuring customers who log into the site are authorized. By default, this consists of ensuring the customers email and password match the values in the database. On this project, you need to verify additional data in this process.
Keeping in mind upgradeability, how is this done?

Question33: A merchant tasks you to keep sales managers out of the system configuration backend pages.
How do you do that using the admin interface?

Question34: You need to add a new column to the sales_shipment and the sales_shipment_grid tables. Other than utilizing the default addColumn methods, what way is automatic?

Question35: You are adding a new entry to the backend menu that appears after
Marketing > SEO & Search > Site Map
You see the existing site map menu item is declared by the node:

What two actions do you take to configure the new menu entry location? (Choose two.)

Question36: Magento allows you to specify custom values per store for product attributes created in the admin panel.
Which architectural pattern makes it possible?

Question37: You are building a new module to add extra functionality to the Magento application. What files are required?

Question38: You are updating a module to add extra functionality to the Magento application, Where would Magento look for modules?

Question39: In a code review of a merchant's site you have discovered that there are multiple observers for the checkout_submit_all_after event. After closer inspection, you notice one of these observers is relying on the others being executed before it is called.
What risk does this pose, and how can it be mitigated?

Question40: You are working on a new entity called vendor. You implemented the model, resource model and collection.
You want to ensure that standard model events will be fired for your model, so an observer can be created for the events vendor_save_after, vendor_save_commit_after and others.
How do you do that?

Question41: The constructor function for \Magento\Catalog\Model\Category contains this excerpt:

With the automatic dependency injection that Magento provides, how is the StoreManagerInterface resolved?

Question42: In a custom module you are adding a new field to the store configuration. The field will set the value for the configuration path mycompany/mymodule/myoption.
How do you supply the default value for that configuration option?

Question43: Your module, MyCompany_MyModule, is using the frontName mymodule. You need to locate the class responsible for the frontend path /mymodule/custom.
What file contains the controller class for the frontend path /mymodule/custom?

Question44: In layout files you can change al element's order on a page. This can be done using one of the following:
* <move> instruction
* before and after element attributes?
How are two methods different?

Question45: Which method of a Magento resource model will remove a record from the database?